﻿<script language="javascript" type="text/javascript">
function tableOrdering( order, dir, task )
{
	var form = document.adminForm;
 
	form.filter_order.value = order;
	form.filter_order_Dir.value = dir;
	document.adminForm.submit( task );
}
function change()
{
	document.adminForm.submit();
}

</script>
<style type="text/css">
tr.sortable th img {
	margin-left: 5px;
}
</style>
<?php // no direct access
defined('_JEXEC') or die('Restricted access'); ?>
<form id="adminForm" action="<?php echo JRoute::_( 'index.php' );?>" method="post" name="adminForm">
<div id="editcell"> 
	<div style="margin-bottom:10px;margin-top:-10px; float:left; clear:none">Tên sinh viên:  
		<input type="text" size=30 name="tensv" id="tensv"></input>
		<input type="submit" value="search"></input>
	</div>
	<div style="float:right;margin-bottom:10px;margin-top:-10px; clear:none">  
		<?php
		echo $this->lists['type'];
	?>
	</div>
	<div style="clear:both">
	</div>
    <table class="adminlist"> 
    <thead> 
        <tr class="sortable"> 
            <th> 
                <?php echo JText::_( 'Mã sinh viên' ); ?> 
            </th> 
            <th> 
                <?php echo JHTML::_( 'grid.sort', 'Tên Sinh Viên', 'tensv', $this->lists['order_Dir'], $this->lists['order']); ?>
            </th> 
			<th> 
                <?php echo JHTML::_( 'grid.sort', 'Khóa học', 'khoahoc', $this->lists['order_Dir'], $this->lists['order']); ?> 
            </th> 
			<th> 
                <?php echo JHTML::_( 'grid.sort', 'Lớp', 'tensv', $this->lists['order_Dir'], $this->lists['order']); ?>
            </th> 
			<th> 
                <?php echo JHTML::_( 'grid.sort', 'Mã ngành', 'manganh', $this->lists['order_Dir'], $this->lists['order']); ?>
            </th> 
			<th> 
                <?php echo JHTML::_( 'grid.sort', 'Loại Tốt nghiệp', 'loaitotnghiep', $this->lists['order_Dir'], $this->lists['order']); ?>
            </th> 
			<th> 
                <?php echo JHTML::_( 'grid.sort', 'Đề tài Tốt nghiệp', 'detaitotnghiep', $this->lists['order_Dir'], $this->lists['order']); ?>
            </th> 
			<th> 
                <?php echo JHTML::_( 'grid.sort', 'Quên quán', 'quequan', $this->lists['order_Dir'], $this->lists['order']); ?> 
            </th> 
			<th width="20"> 
				<input type="checkbox" name="toggle" value="" 
				onclick="checkAll(<?php echo count( $this->items ); ?>);" /> 
			</th> 
        </tr>             
    </thead> 
    <?php 
    $k = 0; 
    for ($i=0, $n=count( $this->items ); $i < $n; $i++) 
    { 					
	        $row =& $this->items[$i]; 
			$checked    = JHTML::_( 'grid.id', $i, $row->masv ); 
			$link = JRoute::_( 'index.php?option=com_cuusinhvien&controller=cuusinhvien&task=edit&cid[]='. $row->masv ); 
        ?> 
        <tr class="<?php echo "row$k"; ?>" align="center"> 
            <td> 
                <a href="<?php echo $link; ?>"><?php echo $row->masv; ?></a> 
            </td> 
            <td> 
                <?php echo $row->tensv; ?> 
            </td> 
			<td> 
                <?php echo $row->khoahoc; ?> 
            </td> 
			<td> 
                <?php echo $row->lop; ?> 
            </td>
			<td> 
                <?php echo $row->manganh; ?> 
            </td>
			<td> 
                <?php echo $row->loaitotnghiep; ?> 
            </td>
			<td> 
                <?php echo $row->detaitotnghiep; ?> 
            </td>
			<td> 
                <?php echo $row->quequan; ?> 
            </td>
			<td> 
				<?php echo $checked; ?> 
			</td> 
        </tr> 
        <?php 
        $k = 1 - $k; 
    } 
	
    ?> 
	<tfoot>
    <tr>
      <td colspan="9"><?php echo $this->pagination->getListFooter(); ?></td>
    </tr>
  </tfoot>

    </table> 
</div> 
 
<input type="hidden" name="option" value="com_cuusinhvien" /> 
<input type="hidden" name="task" value="" /> 
<input type="hidden" name="boxchecked" value="0" /> 
<input type="hidden" name="controller" value="cuusinhvien" /> 
<input type="hidden" name="filter_order" value="<?php echo $this->lists['order']; ?>" />
<input type="hidden" name="filter_order_Dir" value="<?php echo $this->lists['order_Dir']; ?>" />
<input type="hidden" name="view" value="cuusinhvien" />

</form> 